import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import {
  Button,
  Form,
  Field,
  CellGroup,
  Empty,
  Toast,
  Search,
  Icon,
  Col,
  Row,
  Grid,
  GridItem,
  Skeleton,
  Image as VanImage,
  List,
  Cell,
  PullRefresh,
  NavBar,
  DropdownMenu,
  DropdownItem,
  Loading,
  Popup,
  Tab,
  Tabs,
  Tag,
  Rate,
  Slider,
  Collapse,
  CollapseItem,
  Circle,
  ShareSheet,
  Picker,
  Progress,
  Sticky,
  Lazyload
} from "vant";
import "@/style/index.scss";
import "@/permission.js";
import "fullpage.js/dist/fullpage.css";
import animated from "animate.css";
import animate from "@/directive/animate/index";

const app = createApp(App);

app.directive("animate", {
  mounted(el, binding) {
    animate(el, binding);
  }
});

app
  .use(Button)
  .use(Form)
  .use(Field)
  .use(CellGroup)
  .use(Empty)
  .use(Toast)
  .use(Search)
  .use(Icon)
  .use(Col)
  .use(Row)
  .use(Grid)
  .use(GridItem)
  .use(Skeleton)
  .use(VanImage)
  .use(List)
  .use(Cell)
  .use(PullRefresh)
  .use(NavBar)
  .use(DropdownMenu)
  .use(DropdownItem)
  .use(Loading)
  .use(Popup)
  .use(Tab)
  .use(Tabs)
  .use(Tag)
  .use(Rate)
  .use(Slider)
  .use(Collapse)
  .use(CollapseItem)
  .use(Circle)
  .use(ShareSheet)
  .use(Picker)
  .use(Progress)
  .use(Sticky)
  .use(Lazyload)
  .use(animated)
  .use(store)
  .use(router)
  .mount("#app");
